package com.jianshuai.feign;

import com.jianshuai.domain.User;
import com.jianshuai.fallback.UserFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "user-server", fallbackFactory = UserFeignClientFallbackFactory.class)
public interface UserFeignClient {

    @GetMapping("/user/getId/{userId}")
    User getId(@PathVariable("userId") Long userId);
}
